package cn.edu.zut.score.core.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import cn.edu.zut.score.core.domain.DataLogInfo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * @author zby
 * @since 2021-06-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user")
@ApiModel("User对象")
public class User extends DataLogInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "学生学号/教师工号")
    @TableField("no_id")
    private String noId;

    @ApiModelProperty(value = "用户姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "用户角色 0管理员 1教师 2学生")
    @TableField("role")
    private Integer role;

    @ApiModelProperty(value = "用户密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "班级ID")
    @TableField("clazz_id")
    private Long clazzId;

    @ApiModelProperty(value = "用户性别（0女1男）")
    @TableField("gender")
    private Integer gender;

    @ApiModelProperty(value = "用户手机号")
    @TableField("mobile")
    private String mobile;

    @ApiModelProperty(value = "用户邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "用户地址")
    @TableField("address")
    private String address;


}
